package com.mytijian.task.selector;

import com.mytijian.task.zookeeper.NodeService;
import com.mytijian.task.zookeeper.ZookeeperRegistryCenter;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.leader.LeaderLatch;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class SelectorClient3 {
    public static void main(String[] args) throws InterruptedException {
        List<LeaderLatch> latches = new ArrayList<>();
        List<CuratorFramework> clients = new ArrayList<>();
        ZookeeperRegistryCenter registryCenter = new ZookeeperRegistryCenter(null);
        registryCenter.init();
        NodeService nodeService = new NodeService(registryCenter, 88);
        Random random = new Random();
        int ran = random.nextInt(100);
        System.out.println("****************ran = " + ran);
        nodeService.init();
        Thread.sleep(100000);
    }
}
